# -*- coding: utf-8 -*-
from odoo import models, api, fields, tools
from odoo.exceptions import UserError
import re


class task_indicator(models.Model):

    _name = "proman.task_indicator"
    _description = "建设内容"
    _table = "proman_task_indicator"
    _order = "sequence"

    sequence = fields.Integer(string="排序",translate = 0)
    name = fields.Char(string="建设内容",help = '请输入建设内容',required = 1,translate = 0)
    indicator_category_id = fields.Many2one(string="指标分类",comodel_name = 'proman.task_category',translate = 0)
    company_id = fields.Many2one(string="所属公司",comodel_name = 'res.company',default = lambda self:self.env.company,required = 1,translate = 0)
    uom_id = fields.Many2one(string="计量单位",comodel_name = 'uom.uom',translate = 0)
    payment_category_id = fields.Many2one(string="支付类别",comodel_name = 'proman.payment_category',translate = 0)
    payment_rate = fields.Float(string="支付比例",translate = 0)
    depreciation_category_id = fields.Many2one(string="折旧类别",comodel_name = 'proman.depreciation_category',translate = 0)
    depreciation_rate = fields.Float(string="折旧率",translate = 0)
    memo = fields.Html(string="备注说明",translate = 0)
